.el-form {
    &.zrx-grid-form {
        display: grid;
        align-content: start;
        grid-gap: 24px 32px;
        width: 100%;
        padding-bottom: 24px;

        &:not(.intandem) {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            .el-form-item {
                margin-bottom: 0;
                .el-form-item__content {
                    > .label {
                        height: 20px;
                        margin: 0 0 4px 0;
                        @include ellipsis;
                        &[required] {
                            &:before {
                                content: none;
                            }
                            &:after {
                                content: "*";
                                margin-right: 2px;
                                font-size: 14px;
                                color: $error;
                            }
                        }
                    }
                }
            }
            .el-select {
                width: 100%;
            }
        }
        &.intandem {
            grid-template-columns: 100%;
            .el-form-item {
                .el-form-item__content {
                    display: grid;
                    //grid-template-rows: 32px;
                    grid-template-columns: repeat(1, var(--label-width, 86px) calc(100% - var(--label-width, 86px)));
                    justify-items: stretch;
                    align-items: center;
                    //height: 32px;
                    > .label {
                        grid-area: 1 / 1 / 2 / 2;
                        align-self: start;
                        margin: 0 8px 0 0;
                        line-height: 32px;
                        text-align: right;
                        @include ellipsisL(2);
                        + div {
                            grid-area: 1 / 2 / 2 / 3;
                        }
                        &[required] {
                            &:before {
                                content: "*";
                                margin-right: 2px;
                                font-size: 14px;
                                color: $error;
                            }
                        }
                    }
                }
                &.is-error {
                    .el-form-item__content {
                        .el-form-item__error {
                            grid-area: 2 / 2 / 3 / 3;
                        }
                    }
                }
            }
        }
        &.view-mode {
            .el-form-item {
                .el-form-item__content {
                    .el-input__inner,
                    .el-textarea__inner {
                        padding-right: 0;
                        padding-left: 0;
                        border-color: transparent;
                        border-radius: 0;
                        cursor: text;
                        background-color: transparent;
                        @include ellipsis;
                    }
                    .el-input__suffix {
                        display: none;
                    }
                }
            }
        }

        .el-form-item {
            .el-form-item__content {
                position: relative;
                line-height: 1;
                > .label {
                    display: block;
                    line-height: 20px;
                    color: $--text-dim;
                }
            }
            &.is-error {
                .el-form-item__content {
                    .el-form-item__error {
                        position: absolute;
                        width: 100%;
                        height: 22px;
                        padding: 2px 0 0;
                        line-height: 20px;
                        color: $error;
                    }
                    .el-input {
                        &.is-disabled {
                            .el-input__inner {
                                border-color: $border;
                            }
                            + .el-form-item__error {
                                display: none;
                            }
                        }
                    }
                    .el-input__inner,
                    .el-input__inner:focus,
                    .el-textarea__inner,
                    .el-textarea__inner:focus,
                    .zrx-date-time-picker,
                    .zrx-time-picker,
                    .zrx-upload-image .el-upload--picture-card,
                    .zrx-upload-file .el-upload--text,
                    .zrx-drop-tree,
                    .zrx-multiple-select {
                        border-color: $error !important;
                        box-shadow: 0 0 4px 2px getColorVar(--error, 0.1);
                    }
                }
            }
            // &.is-success.is-required {
            //     .el-form-item__content {
            //         .el-input:not(.is-disabled) {
            //             .el-input__inner {
            //                 border-color: $success;
            //                 box-shadow: 0 0 4px 2px getColorVar(--success, 0.1);
            //             }
            //         }
            //         .el-input__inner,
            //         .el-input__inner:focus,
            //         .el-textarea__inner,
            //         .el-textarea__inner:focus,
            //         .zrx-date-time-picker,
            //         .zrx-time-picker,
            //         .zrx-upload-image .el-upload--picture-card,
            //         .zrx-upload-file .el-upload--text,
            //         .zrx-drop-tree,
            //         .zrx-multiple-select,
            //         .el-radio-group,
            //         .el-checkbox-group {
            //             border-color: $success;
            //             box-shadow: 0 0 4px 2px getColorVar(--success, 0.1);
            //         }
            //     }
            // }
        }
    }

    &.zrx-common-form {
        // 必填标识（*）在前
        &.pre-required {
            .el-form-item.is-required {
                .el-form-item__label {
                    &::after {
                        display: none;
                    }
                    &::before {
                        display: inline;
                        color: $error;
                        margin-right: 2px;
                    }
                }
            }
        }

        .el-form-item {
            margin-bottom: var(--form-mb, 16px);

            // 必填标识（*）在后
            &.is-required {
                .el-form-item__label {
                    &::after {
                        content: "*";
                        color: $error;
                        margin-left: 2px;
                    }
                    &::before {
                        display: none;
                    }
                }
            }

            .el-form-item__label {
                font-size: 14px;
                line-height: 20px;
                margin-bottom: 4px;
                padding-bottom: 0;
                color: getColorVar(--font, 0.7);
            }

            .el-form-item__content {
                // line-height: 32px;

                .el-radio-group {
                    border: none;
                    line-height: 32px;
                    display: inline-flex;
                    flex-wrap: wrap;

                    .el-radio {
                        line-height: 32px;
                        margin-top: 0;
                    }
                }

                .el-input__inner {
                    line-height: 32px;
                }
            }
        }
    }
}
